home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Periodicals / develop / develop 4 code / C++ Driver / iacDriver / IACHeaders.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-15  |  2.0 KB  |  57 lines  |  [TEXT/MPS ]

  1. /**********************************Comment*****************************************
  2.  * These are all the constants we want to export to the world.  Anyone who wants to
  3.  * use the driver will include this header in their code.  The IACRecord is the 
  4.  * structure by which the caller specifies who to send messages to (or receive 
  5.  * messages from).  It's also used for the other control (or status) routines which
  6.  * set or return information.
  7.  **********************************End Comment************************************/
  8.  
  9. #ifndef     __IACHeaders__                // Define so we don't include twice.
  10. #define    __IACHeaders__
  11.  
  12. #include    <Types.h>
  13. #include    <Traps.h>
  14. #include    <Files.h>                    // One thing which as always bugged me is that
  15. #include    <Devices.h>                    // the parameter block definition is in Files.h.
  16. #include    <Memory.h>
  17.  
  18. const        short        kAbnormErr = 1;
  19. const        short        kNoMore = -1;
  20. const        short        kBadCsCode = -2;
  21. const        short        kMsgMemErr = -3;
  22. const        short        kNoErr = 0;
  23. const        short        kNoRead = -96;
  24. const        short        kNoWrite = -97;
  25. const        short        kMoreMessages = 98;
  26. const        short        kYesMessagesForMe = 99;
  27. const        char        kZeroChar = '\0';
  28.  
  29. // csCodes for Control Calls
  30. const        short        kGoodbye = -1;
  31. const        short        kKillIO = 1;
  32. const        short        kRegisterApp = 2;
  33. const        short        kSendMessage = 3;
  34. const        short        kReceiveMessage = 4;
  35. const        short        kUnregisterApp = 5;
  36.  
  37. // csCodes for Status Calls
  38. const        short        kAnyMsgForMe = 2;
  39. const        short        kWhosThere = 3;
  40.  
  41. struct IACRecord    {
  42.     short    mySignature;                // Signature number of application sending/receiving
  43.     short    partnerSig;                    // Signature of app that's either sent a  message
  44.                                             // or off app which the current app is sending to.
  45.     short    indexForWhosThere;        // Index to cycle through the applications which
  46.                                              // have registered.
  47.     short    actualCount;                // Non zero if messages there for recipient.
  48.     char*    messageString;                // Message string being sent or received.
  49.     char    *appName;                    // String to register as.
  50. };
  51. typedef struct IACRecord IACRecord;
  52.  
  53.  
  54. #include "TDriver.h"                
  55. #include    "TMessage.h"                
  56. #include    "DriverWrapper.h"            
  57. #endif